<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'新建新联系人'))}
	<div class="frame">
		<form method='post' id="form_data" class="row">
			<input type="hidden" name="opmode" value="add">
			<input type="hidden" name="ajax" id="ajax" value="1">
			<div class="box col-6">
				<label class="input-label" for="name">姓名*：</label>
				<input class="input" type="text" id="name" name="name" check="required" info="请输入姓名">
			</div>
			<div class="box col-6">
				<label class="input-label" for="company">公司：</label>
				<input class="input" type="text" id="company" name="company" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="dept">部门：</label>
				<input  class="input" type="text" id="dept" name="dept">
			</div>
			<div class="box col-6">
				<label class="input-label" for="position">职位：</label>
				<input class="input" type="text" id="position" name="position" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="mobile_tel">手机：</label>
				<input  class="input" type="text" id="mobile_tel" name="mobile_tel" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="office_tel">办公电话：</label>
				<input  class="input" type="text" id="office_tel" name="office_tel" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="email">邮件：</label>
				<input class="input" type="text" id="email" name="email" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="im">即时聊天：</label>
				<input class="input" type="text" id="im" name="im" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="address">地址：</label>
				<input  class="input" type="text" id="address" name="address" >
			</div>
			<div class="box col-6">
				<label class="input-label" for="website">网址：</label>
				<input  class="input" type="text" id="website" name="website">
			</div>
			<div class="box col-12">
				<label class="input-label" for="remark" >其他：</label>
				<textarea class="textarea" id="remark" name="remark" rows="5" class="col-xs-12" ></textarea>
			</div>
			<div class="box col-12">
				<label class="input-label" ></label>
				<a class="btn btn-normal" onclick="save()">保存</a>
				<a class="btn btn-return" onclick="go_return_url()">取消 </a>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global', 'uploader'], function() {
			var $ = layui.jquery;
			var fn = {
				save : function() {
					send_form("form_data", "{:url('save')}", "{:url('index')}", function(ret) {
						if (ret.status) {
							layer.msg(ret.info, {
								time : 1200
							}, function() {
								location.href = "{:url('index')}";
							});
						} else {
							layer.msg(ret.info);
							return false;
						}
					});
				},
			};
			win_exp(fn);
		});
	</script>
</block>